<template>
  <div id="app">
    <!-- 顶部 -->
    <mt-header fixed title="固定在顶部"></mt-header>
    <!-- 中间部分 -->
    <transition name="my">
      <router-view class="zhongjian"></router-view>
    </transition>
    <!-- 底部部分 -->
    <nav class="mui-bar mui-bar-tab">
      <router-link class="mui-tab-item" to="/">
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">首页</span>
      </router-link>
      <router-link class="mui-tab-item" to="tabbar-with-contact">
        <span class="mui-icon mui-icon-contact"></span>
        <span class="mui-tab-label">会员</span>
      </router-link>
      <router-link class="mui-tab-item" to="tabbar-with-map">
        <span class="mui-icon mui-icon-extra mui-icon-extra-cart">
          <span class="mui-badge">9</span>
        </span>
        <span class="mui-tab-label">购物车</span>
      </router-link>
      <router-link class="mui-tab-item" to="tabbar-with-chat">
        <span class="mui-icon mui-icon-search"></span>
        <span class="mui-tab-label">搜索</span>
      </router-link>
    </nav>
  </div>
</template>

<script>
</script>

<style lang='scss' scoped>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  margin-top: 40px;
  overflow-x: hidden;
}
.zhongjian {
  margin-bottom: 50px;
}
.router-link-exact-active {
  color: violet;
}
.my-enter {
  transform: translateX(100%);
  opacity: 0;
}
.my-leave-to {
  position: absolute;
  transform: translateX(-100%);
  opacity: 0;
}
.my-enter-active,
.my-leave-active {
  transition: all 0.5s ease;
}
</style>
